﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucDetail.ascx.cs" Inherits="TTMarketing.UserControl.SanPham.ucDetail" %>
<%@ Register Src="../../ZoomControl/ZoomControls.ascx" TagName="ZoomControls" TagPrefix="uc1" %>
<%--<asp:DataList ID="dlProductDetail" runat="server" DataSourceID="ObjectDataSource1"
    Width="100%">
    <ItemTemplate>
        <div id="com-main-left-title">
            <asp:Label ID="lbProductName" runat="server" Text='<%# Eval("Name") %>' />
        </div>
        <br />
        <br />
        <br />
        <center>
            <asp:Image ID="Image1" runat="server" AlternateText='<%# Eval("Name") %>' 
                ImageUrl='<%# "~/Image/Upload/"+Eval("Image") %>' />
        </center>
        <br />
        <div id="com-left-box">
            <asp:Label ID="blProductDescription" runat="server" Text='<%# Eval("Detail") %>'></asp:Label>
        </div>
        <br />
    </ItemTemplate>
</asp:DataList>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="getById"
    TypeName="TTBusiness.ClassDB.clsBSProduct">
    <SelectParameters>
        <asp:QueryStringParameter Name="id" QueryStringField="id" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>--%>
<style type="text/css">
    #image
    {
        height: 283px;
        width: 283px;
    }
    .style1
    {
        width: 10px;
    }
</style>
<script src="ZoomControl/jqzoom.pack.1.0.1.js" type="text/javascript"></script>
<link rel="stylesheet" href="ZoomControl/jqzoom.css" type="text/css">
<script type="text/javascript">

    $(function () {
        var options2 =
            {
                zoomWidth: 350,
                zoomHeight: 410,
                position: 'right',
                showEffect: 'show',
                hideEffect: 'fadeout',
                fadeoutSpeed: 'slow',
                lens: false,
                title: false
            }

        $(".jqzoom").jqzoom(options2);
    });
</script>
<script type="text/javascript">
    function nam(image) {
        document.getElementById('image').src = image;
        document.getElementById('link').href = image;
    }
   
</script>
<link href="Css/jquery.lightbox-0.5.css" rel="stylesheet" type="text/css" />
<script src="Script/jquery.lightbox-0.5.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $('#galleryBox a').lightBox();
    });

</script>
<div id="galleryBox" style="margin-left: 0px; padding-left: 0px; float: left; width: 100%;">
    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="ObjectDataSourceDetails"
        Height="50px" Width="100%" BorderWidth="0px" GridLines="None">
        <Fields>
            <asp:TemplateField>
                <ItemTemplate>
                    <table width="100%" cellpadding="0" cellspacing="0" border="0">
                        <tr>
                            <td width="130px" colspan="3">
                                <div id="com-main-left-title">
                                    <asp:Label ID="Label2" runat="server" Text='<%# Eval("Name") %>' Font-Bold="True"
                                        Font-Size="Large"></asp:Label>
                                    :
                                    <asp:Label ID="Label4" runat="server" Text='<%# Eval("SeriNumber") %>'></asp:Label>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" width="130px">
                                <br />
                                <uc1:ZoomControls ID="ZoomControls1" runat="server" />
                                &nbsp;<asp:DetailsView ID="DetailsView2" runat="server" AutoGenerateRows="False"
                                    DataKeyNames="ID" DataSourceID="ObjectDataSourceHinhAnh" EnableModelValidation="True"
                                    BorderWidth="0px" GridLines="None">
                                    <Fields>
                                        <asp:TemplateField>
                                            <ItemTemplate>
                                                <div align="center" style="text-align: center">
                                                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("Name", "~/Image/Upload/{0}") %>'>
                                                        Xem ảnh lớn
                                                    </asp:HyperLink>
                                                    <br />
                                                    <br />
                                                    <%--<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# Eval("URL") %>'>Xem thêm ảnh</asp:HyperLink>--%>
                                                </div>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Fields>
                                </asp:DetailsView>
                                &nbsp;<asp:ObjectDataSource ID="ObjectDataSourceHinhAnh" runat="server" SelectMethod="Image_getByProduct"
                                    TypeName="TTController.clsController">
                                    <SelectParameters>
                                        <asp:QueryStringParameter Name="prId" QueryStringField="id" Type="Int32" />
                                    </SelectParameters>
                                </asp:ObjectDataSource>
                            </td>
                            <td align="left" style="vertical-align: top; padding-right: 25px;" valign="top" class="style1">
                                &nbsp;
                            </td>
                            <td style="vertical-align: top; text-align: left">
                                <br />
                                <div id="com-left-box">
                                    <asp:Label ID="Label7" runat="server" Text='<%# Eval("Summary") %>'></asp:Label>
                                </div>
                                <br />
                            </td>
                        </tr>
                        <tr>
                            <td align="left" valign="top" colspan="3">
                                <div  style="font-size:16px;color:#999;">
                                    <asp:Label ID="Label5" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                                    &nbsp;:
                                    <asp:Label ID="Label6" runat="server" Text='<%# Eval("SeriNumber") %>'></asp:Label>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td align="left" colspan="3" valign="top">
                                <div style="color:#999;">
                                    <asp:Label ID="blProductDescription" runat="server" Text='<%# Eval("Detail") %>'></asp:Label>
                                </div>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:TemplateField>
        </Fields>
    </asp:DetailsView>
    <asp:ObjectDataSource ID="ObjectDataSourceDetails" runat="server" SelectMethod="getById"
        TypeName="TTBusiness.ClassDB.clsBSProduct">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="" Name="id" QueryStringField="id" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:Label ID="Label1" runat="server"></asp:Label>
</div>
